package inventory.daoImplementer;


import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import dbhandelling.Connections;
import dbhandelling.Crude;
import inventory.daoInterface.CategoryMasterDao;
import inventory.model.CategoryMaster;

public class CategoryMasterImplementor  extends Crude implements CategoryMasterDao {
             
	public CategoryMasterImplementor() {
		}
	
	@Override
	public void add(CategoryMaster category) throws Exception 
	{
		String[]values=new String[3];
		values[0]=category.getCatCode();
		values[1]=category.getCatName();
		values[2]=category.getStatus()+"";
		insert("CategoryMaster",values);
		}

	@Override
	public void update(CategoryMaster cat) throws Exception {
		this.update("CategoryMaster", "catName",cat.getCatName(), "catCode",cat.getCatCode());
		this.update("CategoryMaster", "status",cat.getStatus()+"", "catCode",cat.getCatCode());
	}

	
	@Override
	public void delete(CategoryMaster cat) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public CategoryMaster retreive(String conditionField, String ConditionValue) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public CategoryMaster[] retreiveArray(String conditionField,
			String ConditionValue) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public CategoryMaster[] retreiveAll() {
		// TODO Auto-generated method stub
		return null;
	}
	
	

	
	
	
	
	

}
